import request from '@/utils/request'

// 获取角色
export const jiaose = (params) => {
  return request({
    url: '/sys/role',
    params
  })
}

// 新增角色
export const xinzeng = (data) => {
  return request({
    url: '/sys/role',
    method: 'post',
    data
  })
}

// 删除角色
export const deljuese = (id) => {
  return request({
    url: `/sys/role/${id}`,
    method: 'DELETE'
  })
}

// 修改角色
export const xiugaijuese = (data) => {
  return request({
    url: `/sys/role/${data.id}`,
    method: 'PUT',
    data
  })
}
// 获取角色详细信息
export const xiangxixinxi = (id) => {
  return request({
    url: `/sys/role/${id}`
  })
}
